package cn.tpshion.config.common;

/**
 * 系统错误码
 * 非必要不允许新增
 */
public enum ErrorCode {

    OK("00","ok"),
    FAIL("400","fail"),
    SYSTEM_ERROR("500", "系统异常"),
    NO_ACCESS("401", "访问未授权"),
    PARAM_ERROR("601", "参数错误"),
    REQUEST_BODY_NULL("602", "请求体数据为空"),
    CONTENT_TYPE_ERROR("603", "请求Content-Type类型错误"),
    UPLOAD_MAX_ERROR("604", "上传文件大小超限制"),
    TOKEN_ERROR("605", "认证失败");

    private String code;

    private String msg;

    ErrorCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
